home *** CD-ROM | disk | FTP | other *** search
/ Aminet 22 / Aminet 22 (1997)(GTI - Schatztruhe)[!][Dec 1997].iso / Aminet / dev / c / focs.readme < prev    next >
Text File  |  1997-11-02  |  2KB  |  51 lines

  1. Short:    Creates C header files for SetFunction()
  2. Author:   andrea.vallinotto@torino.alpcom.it
  3. Uploader: andrea.vallinotto@torino.alpcom.it
  4. Version:  1.0
  5. Type:     dev/c
  6.  
  7. This is a little tool I made for all programmers who need to call SetFunction()
  8. from C (or C++). It is intended to make life easier and to make source files more
  9. readable.
  10.  
  11. Usually, when one want to use SetFunction(), he/she must look in .fd files or
  12. #pragma statements to find the LVO of each function he/she want to patch (*). This
  13. leads to source files difficult to understand and maintain, since each call to
  14. SetFunction() looks like:
  15.  
  16. oldfunction=SetFunction(Execbase,-690,myfunction);
  17.  
  18. where you can't understand very well which function is being patched, unless you
  19. add tons of comment lines to each call.
  20.  
  21. (*)= All the system libraries offsets exist through amiga.lib, but 3rd party
  22. libraries don't. This is why I made FOCS!
  23.  
  24. FOCS (that stands for Function Offset Creator for SetFunction() ), takes a file
  25. with LVOs and creates nice C header (.h) files, with a symbol definition for each
  26. function found in the LVO file.
  27. So the example above will look like:
  28.  
  29. oldfunction=SetFunction( Execbase, FOS_FreeVec, myfunction );
  30.  
  31. Nice, isn't it ?
  32.  
  33. FOCS version 1.0 support the following file formats:
  34.  - SAS C #pragma files
  35.  - StormC #pragma files (similar but not the same stuff).
  36.  - FD files (those who started it all).
  37.  - GCC inline's (hopefully... only the new, preprocessor based format is
  38.    supported). 
  39.  
  40.  
  41. ============================= Archive contents =============================
  42.  
  43. Original  Packed Ratio    Date     Time    Name
  44. -------- ------- ----- --------- --------  -------------
  45.    33516   17855 46.7% 26-Oct-97 12:08:42  focs
  46.     4009    1971 50.8% 26-Oct-97 12:09:16  focs.doc
  47.     7144    4910 31.2% 26-Oct-97 12:08:42  focs.pch
  48.     1483     778 47.5% 26-Oct-97 12:08:42  focs.readme
  49. -------- ------- ----- --------- --------
  50.    46152   25514 44.7% 27-Oct-97 02:21:16   4 files
  51.